#!/bin/bash
dt="`date -d '-1 days' +"%Y-%m-%d"`"
arr=(ads_aml_customer_risk_profile ads_aml_daily_risk_report ads_aml_regulatory_monthly ads_aml_alert_efficiency)

for i in ${arr[@]}; do
hive_tab="$i"
sqoop export \
--connect jdbc:mysql//192.168.88.148:3306/ads \
--username root \
--password 123456 \
--table $i \
--hcatalog-database ads \
--hcatalog-table $hive_tab \
--where etl_date=$dt \
-m 1
done